package com.wisely.ch8_3;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;

public class MyStartUpListener implements ApplicationListener<ContextRefreshedEvent>
{

	@Override
	public void onApplicationEvent(ContextRefreshedEvent event)
	{
		ApplicationContext applicationContext = event.getApplicationContext();
		if (applicationContext != null)
		{
			System.out.println("程序启动了");
		}
	}
}
